ostree: Fix bug printing out commit body
authorStef Walter <stefw@redhat.com>
Thu, 29 Aug 2013 16:14:28 +0000 (18:14 +0200)
committerStef Walter <stefw@redhat.com>
Thu, 29 Aug 2013 19:07:18 +0000 (21:07 +0200)
Body was printed out repeated and mangled due to bad printf format string.

https://bugzilla.gnome.org/show_bug.cgi?id=707067

src/ostree/ot-dump.c

index 08fea7e4fffa00adc8786fbe0d96eaf4f36f18db..eae40a7571b007a1266f38e38ec2ca9b37414773 100644 (file)
@@ -72,7 +72,7 @@ dump_indented_lines (const gchar *data)
       pos = strchr (data, '\n');
       if (pos)
         {
-          g_print ("%s%*s", indent, (int)(pos + 1 - data), data);
+          g_print ("%s%.*s", indent, (int)(pos + 1 - data), data);
           data = pos + 1;
         }
       else